package cn.iocoder.yudao.module.agent.dal.mysql.withdrawaccount;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.agent.dal.dataobject.withdrawaccount.AgentWithdrawAccountDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.agent.controller.admin.withdrawaccount.vo.*;

/**
 * 代理人佣金提现账户 Mapper
 *
 * @author 曹建伟
 */
@Mapper
public interface AgentWithdrawAccountMapper extends BaseMapperX<AgentWithdrawAccountDO> {

    default PageResult<AgentWithdrawAccountDO> selectPage(AgentWithdrawAccountPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AgentWithdrawAccountDO>()
                .betweenIfPresent(AgentWithdrawAccountDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AgentWithdrawAccountDO::getId));
    }

    default List<AgentWithdrawAccountDO> selectList(AgentWithdrawAccountExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<AgentWithdrawAccountDO>()
                .betweenIfPresent(AgentWithdrawAccountDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AgentWithdrawAccountDO::getId));
    }

}
